<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>chimera.util.tests.test_coord</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="chimera-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://chimera.ufsc.br/">Chimera - Observatoty Automation System</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="chimera-module.html">Package&nbsp;chimera</a> ::
        <a href="chimera.util-module.html">Package&nbsp;util</a> ::
        <a href="chimera.util.tests-module.html">Package&nbsp;tests</a> ::
        Module&nbsp;test_coord
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="chimera.util.tests.test_coord-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="chimera.util.tests.test_coord-module.html">Module chimera.util.tests.test_coord</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package chimera=chimera-module.html"><a title="chimera" class="py-name" href="#" onclick="return doclink('link-0', 'chimera', 'link-0');">chimera</a></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Module chimera.controllers.imageserver.util=chimera.controllers.imageserver.util-module.html,Module chimera.core.util=chimera.core.util-module.html,Package chimera.util=chimera.util-module.html"><a title="chimera.controllers.imageserver.util
chimera.core.util
chimera.util" class="py-name" href="#" onclick="return doclink('link-1', 'util', 'link-1');">util</a></tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Module chimera.util.coord=chimera.util.coord-module.html"><a title="chimera.util.coord" class="py-name" href="#" onclick="return doclink('link-2', 'coord', 'link-2');">coord</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Class chimera.util.coord.Coord=chimera.util.coord.Coord-class.html"><a title="chimera.util.coord.Coord" class="py-name" href="#" onclick="return doclink('link-3', 'Coord', 'link-3');">Coord</a></tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">asciidata</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">time</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"> </tt>
<a name="TestCoord"></a><div id="TestCoord-def"><a name="L8"></a><tt class="py-lineno">  8</tt> <a class="py-toggle" href="#" id="TestCoord-toggle" onclick="return toggle('TestCoord');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="chimera.util.tests.test_coord.TestCoord-class.html">TestCoord</a> <tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TestCoord-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TestCoord-expanded"><a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="TestCoord.equal"></a><div id="TestCoord.equal-def"><a name="L11"></a><tt class="py-lineno"> 11</tt> <a class="py-toggle" href="#" id="TestCoord.equal-toggle" onclick="return toggle('TestCoord.equal');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="chimera.util.tests.test_coord.TestCoord-class.html#equal">equal</a> <tt class="py-op">(</tt><tt class="py-param">a</tt><tt class="py-op">,</tt> <tt class="py-param">b</tt><tt class="py-op">,</tt> <tt class="py-param">e</tt><tt class="py-op">=</tt><tt class="py-number">0.0001</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TestCoord.equal-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TestCoord.equal-expanded"><a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt> <tt class="py-name">abs</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">-</tt><tt class="py-name">b</tt><tt class="py-op">)</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
</div><a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"> </tt>
<a name="TestCoord.test_parsing_conversion_bsc"></a><div id="TestCoord.test_parsing_conversion_bsc-def"><a name="L14"></a><tt class="py-lineno"> 14</tt> <a class="py-toggle" href="#" id="TestCoord.test_parsing_conversion_bsc-toggle" onclick="return toggle('TestCoord.test_parsing_conversion_bsc');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="chimera.util.tests.test_coord.TestCoord-class.html#test_parsing_conversion_bsc">test_parsing_conversion_bsc</a> <tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TestCoord.test_parsing_conversion_bsc-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TestCoord.test_parsing_conversion_bsc-expanded"><a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line">        <tt class="py-docstring">"""Parsing and comparing to Vizier calculated values the entire 5th Bright Star Catalogue"""</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line">        <tt class="py-name">bsc</tt> <tt class="py-op">=</tt> <tt class="py-name">asciidata</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Method chimera.drivers.domelna40cm.DomeLNA40cm.open()=chimera.drivers.domelna40cm.DomeLNA40cm-class.html#open,Method chimera.drivers.fakecamera.FakeCamera.open()=chimera.drivers.fakecamera.FakeCamera-class.html#open,Method chimera.drivers.faketelescope.FakeTelescope.open()=chimera.drivers.faketelescope.FakeTelescope-class.html#open,Method chimera.drivers.meade.Meade.open()=chimera.drivers.meade.Meade-class.html#open,Method chimera.drivers.optectcfs.OptecTCFS.open()=chimera.drivers.optectcfs.OptecTCFS-class.html#open,Method chimera.drivers.sbig.sbig.SBIG.open()=chimera.drivers.sbig.sbig.SBIG-class.html#open,Method chimera.drivers.theskytelescope.TheSkyTelescope.open()=chimera.drivers.theskytelescope.TheSkyTelescope-class.html#open,Method chimera.interfaces.cameradriver.ICameraDriver.open()=chimera.interfaces.cameradriver.ICameraDriver-class.html#open,Method chimera.interfaces.telescopedriver.ITelescopeDriverSlew.open()=chimera.interfaces.telescopedriver.ITelescopeDriverSlew-class.html#open,Method chimera.util.ds9.DS9.open()=chimera.util.ds9.DS9-class.html#open,Function chimera.util.sexcatalog.open()=chimera.util.sexcatalog-module.html#open"><a title="chimera.drivers.domelna40cm.DomeLNA40cm.open
chimera.drivers.fakecamera.FakeCamera.open
chimera.drivers.faketelescope.FakeTelescope.open
chimera.drivers.meade.Meade.open
chimera.drivers.optectcfs.OptecTCFS.open
chimera.drivers.sbig.sbig.SBIG.open
chimera.drivers.theskytelescope.TheSkyTelescope.open
chimera.interfaces.cameradriver.ICameraDriver.open
chimera.interfaces.telescopedriver.ITelescopeDriverSlew.open
chimera.util.ds9.DS9.open
chimera.util.sexcatalog.open" class="py-name" href="#" onclick="return doclink('link-4', 'open', 'link-4');">open</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Module chimera.core.path=chimera.core.path-module.html"><a title="chimera.core.path" class="py-name" href="#" onclick="return doclink('link-5', 'path', 'link-5');">path</a></tt><tt class="py-op">.</tt><tt class="py-name">abspath</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name"><a title="chimera.core.path" class="py-name" href="#" onclick="return doclink('link-6', 'path', 'link-5');">path</a></tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="chimera.core.path" class="py-name" href="#" onclick="return doclink('link-7', 'path', 'link-5');">path</a></tt><tt class="py-op">.</tt><tt class="py-name">dirname</tt><tt class="py-op">(</tt><tt class="py-name">__file__</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'bsc.dat'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">comment_char</tt><tt class="py-op">=</tt><tt class="py-string">'#'</tt><tt class="py-op">,</tt> <tt class="py-name">delimiter</tt><tt class="py-op">=</tt><tt class="py-string">'\t'</tt><tt class="py-op">)</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line">        <tt class="py-name">expected_ra</tt>  <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line">        <tt class="py-name">expected_ra_str</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">        <tt class="py-name">expected_dec</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">        <tt class="py-name">expected_dec_str</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">        <tt id="link-8" class="py-name" targets="Variable chimera.util.position.Position.ra=chimera.util.position.Position-class.html#ra"><a title="chimera.util.position.Position.ra" class="py-name" href="#" onclick="return doclink('link-8', 'ra', 'link-8');">ra</a></tt>  <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">        <tt id="link-9" class="py-name" targets="Variable chimera.util.position.Position.dec=chimera.util.position.Position-class.html#dec"><a title="chimera.util.position.Position.dec" class="py-name" href="#" onclick="return doclink('link-9', 'dec', 'link-9');">dec</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-10" class="py-name" targets="Variable chimera.drivers.sbig.tests.grab.i=chimera.drivers.sbig.tests.grab-module.html#i"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-10', 'i', 'link-10');">i</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">.</tt><tt class="py-name">nrows</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">            <tt class="py-name">expected_ra</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method chimera.util.etree.ElementTree._ElementInterface.append()=chimera.util.etree.ElementTree._ElementInterface-class.html#append,Method chimera.util.votable.VOTable.append()=chimera.util.votable.VOTable-class.html#append"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-11', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-12" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-12', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">            <tt class="py-name">expected_dec</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-13', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-14" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-14', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">            <tt class="py-name">expected_ra_str</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-15', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-16" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-16', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">            <tt class="py-name">expected_dec_str</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-17', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-18" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-18', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">             </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">            <tt id="link-19" class="py-name"><a title="chimera.util.position.Position.ra" class="py-name" href="#" onclick="return doclink('link-19', 'ra', 'link-8');">ra</a></tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-20', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt id="link-21" class="py-name"><a title="chimera.util.coord.Coord" class="py-name" href="#" onclick="return doclink('link-21', 'Coord', 'link-3');">Coord</a></tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Static Method chimera.util.coord.Coord.fromHMS()=chimera.util.coord.Coord-class.html#fromHMS"><a title="chimera.util.coord.Coord.fromHMS" class="py-name" href="#" onclick="return doclink('link-22', 'fromHMS', 'link-22');">fromHMS</a></tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-23" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-23', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">            <tt id="link-24" class="py-name"><a title="chimera.util.position.Position.dec" class="py-name" href="#" onclick="return doclink('link-24', 'dec', 'link-9');">dec</a></tt><tt class="py-op">.</tt><tt id="link-25" class="py-name"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-25', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt id="link-26" class="py-name"><a title="chimera.util.coord.Coord" class="py-name" href="#" onclick="return doclink('link-26', 'Coord', 'link-3');">Coord</a></tt><tt class="py-op">.</tt><tt id="link-27" class="py-name" targets="Static Method chimera.util.coord.Coord.fromDMS()=chimera.util.coord.Coord-class.html#fromDMS"><a title="chimera.util.coord.Coord.fromDMS" class="py-name" href="#" onclick="return doclink('link-27', 'fromDMS', 'link-27');">fromDMS</a></tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-28" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-28', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-29" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-29', 'i', 'link-10');">i</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">.</tt><tt class="py-name">nrows</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">            <tt class="py-comment"># use e=0.0001 'cause its the maximum we can get with Vizier data (4 decimal places only)</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">            <tt class="py-comment"># test conversion from HMS DMS to decimal</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">assert</tt> <tt id="link-30" class="py-name" targets="Class chimera.util.tests.test_coord.TestCoord=chimera.util.tests.test_coord.TestCoord-class.html"><a title="chimera.util.tests.test_coord.TestCoord" class="py-name" href="#" onclick="return doclink('link-30', 'TestCoord', 'link-30');">TestCoord</a></tt><tt class="py-op">.</tt><tt id="link-31" class="py-name" targets="Static Method chimera.util.tests.test_coord.TestCoord.equal()=chimera.util.tests.test_coord.TestCoord-class.html#equal,Function chimera.util.tests.test_position.equal()=chimera.util.tests.test_position-module.html#equal"><a title="chimera.util.tests.test_coord.TestCoord.equal
chimera.util.tests.test_position.equal" class="py-name" href="#" onclick="return doclink('link-31', 'equal', 'link-31');">equal</a></tt><tt class="py-op">(</tt><tt id="link-32" class="py-name"><a title="chimera.util.position.Position.ra" class="py-name" href="#" onclick="return doclink('link-32', 'ra', 'link-8');">ra</a></tt><tt class="py-op">[</tt><tt id="link-33" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-33', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name" targets="Variable chimera.util.coord.Coord.D=chimera.util.coord.Coord-class.html#D,Variable chimera.util.position.Position.D=chimera.util.position.Position-class.html#D"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-34', 'D', 'link-34');">D</a></tt><tt class="py-op">,</tt> <tt class="py-name">expected_ra</tt><tt class="py-op">[</tt><tt id="link-35" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-35', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">=</tt><tt class="py-number">1e-4</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"ra: %.6f != coord ra: %.6f (%.6f)"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">expected_ra</tt><tt class="py-op">[</tt><tt id="link-36" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-36', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-37" class="py-name"><a title="chimera.util.position.Position.ra" class="py-name" href="#" onclick="return doclink('link-37', 'ra', 'link-8');">ra</a></tt><tt class="py-op">[</tt><tt id="link-38" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-38', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-39', 'D', 'link-34');">D</a></tt><tt class="py-op">,</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">                                                                                                            <tt class="py-name">expected_ra</tt><tt class="py-op">[</tt><tt id="link-40" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-40', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">-</tt><tt id="link-41" class="py-name"><a title="chimera.util.position.Position.ra" class="py-name" href="#" onclick="return doclink('link-41', 'ra', 'link-8');">ra</a></tt><tt class="py-op">[</tt><tt id="link-42" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-42', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-43', 'D', 'link-34');">D</a></tt><tt class="py-op">)</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt id="link-44" class="py-name"><a title="chimera.util.tests.test_coord.TestCoord" class="py-name" href="#" onclick="return doclink('link-44', 'TestCoord', 'link-30');">TestCoord</a></tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="chimera.util.tests.test_coord.TestCoord.equal
chimera.util.tests.test_position.equal" class="py-name" href="#" onclick="return doclink('link-45', 'equal', 'link-31');">equal</a></tt><tt class="py-op">(</tt><tt id="link-46" class="py-name"><a title="chimera.util.position.Position.dec" class="py-name" href="#" onclick="return doclink('link-46', 'dec', 'link-9');">dec</a></tt><tt class="py-op">[</tt><tt id="link-47" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-47', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-48', 'D', 'link-34');">D</a></tt><tt class="py-op">,</tt> <tt class="py-name">expected_dec</tt><tt class="py-op">[</tt><tt id="link-49" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-49', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">=</tt><tt class="py-number">1e-4</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"dec: %.6f != coord dec: %.64f (%.6f)"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">expected_dec</tt><tt class="py-op">[</tt><tt id="link-50" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-50', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-51" class="py-name"><a title="chimera.util.position.Position.dec" class="py-name" href="#" onclick="return doclink('link-51', 'dec', 'link-9');">dec</a></tt><tt class="py-op">[</tt><tt id="link-52" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-52', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-53', 'D', 'link-34');">D</a></tt><tt class="py-op">,</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">                                                                                                                 <tt class="py-name">expected_dec</tt><tt class="py-op">[</tt><tt id="link-54" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-54', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">-</tt><tt id="link-55" class="py-name"><a title="chimera.util.position.Position.dec" class="py-name" href="#" onclick="return doclink('link-55', 'dec', 'link-9');">dec</a></tt><tt class="py-op">[</tt><tt id="link-56" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-56', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-57', 'D', 'link-34');">D</a></tt><tt class="py-op">)</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">            <tt class="py-comment"># test strfcoord implementation</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">assert</tt> <tt class="py-name">expected_ra_str</tt><tt class="py-op">[</tt><tt id="link-58" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-58', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt id="link-59" class="py-name"><a title="chimera.util.position.Position.ra" class="py-name" href="#" onclick="return doclink('link-59', 'ra', 'link-8');">ra</a></tt><tt class="py-op">[</tt><tt id="link-60" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-60', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name" targets="Method chimera.util.coord.Coord.strfcoord()=chimera.util.coord.Coord-class.html#strfcoord,Static Method chimera.util.coord.CoordUtil.strfcoord()=chimera.util.coord.CoordUtil-class.html#strfcoord"><a title="chimera.util.coord.Coord.strfcoord
chimera.util.coord.CoordUtil.strfcoord" class="py-name" href="#" onclick="return doclink('link-61', 'strfcoord', 'link-61');">strfcoord</a></tt><tt class="py-op">(</tt><tt class="py-string">"%(h)02d %(m)02d %(s)04.1f"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"ra: %s != coord ra: %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">expected_ra_str</tt><tt class="py-op">[</tt><tt id="link-62" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-62', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">                                                                                                    <tt id="link-63" class="py-name"><a title="chimera.util.position.Position.ra" class="py-name" href="#" onclick="return doclink('link-63', 'ra', 'link-8');">ra</a></tt><tt class="py-op">[</tt><tt id="link-64" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-64', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name"><a title="chimera.util.coord.Coord.strfcoord
chimera.util.coord.CoordUtil.strfcoord" class="py-name" href="#" onclick="return doclink('link-65', 'strfcoord', 'link-61');">strfcoord</a></tt><tt class="py-op">(</tt><tt class="py-string">"%(h)02d %(m)02d %(s)04.1f"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">             </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">expected_dec_str</tt><tt class="py-op">[</tt><tt id="link-66" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-66', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt id="link-67" class="py-name"><a title="chimera.util.position.Position.dec" class="py-name" href="#" onclick="return doclink('link-67', 'dec', 'link-9');">dec</a></tt><tt class="py-op">[</tt><tt id="link-68" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-68', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="chimera.util.coord.Coord.strfcoord
chimera.util.coord.CoordUtil.strfcoord" class="py-name" href="#" onclick="return doclink('link-69', 'strfcoord', 'link-61');">strfcoord</a></tt><tt class="py-op">(</tt><tt class="py-string">"%(d)02d %(m)02d %(s)02.0f"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"dec: %s != coord dec: %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">expected_dec_str</tt><tt class="py-op">[</tt><tt id="link-70" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-70', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">                                                                                                    <tt id="link-71" class="py-name"><a title="chimera.util.position.Position.dec" class="py-name" href="#" onclick="return doclink('link-71', 'dec', 'link-9');">dec</a></tt><tt class="py-op">[</tt><tt id="link-72" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-72', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-73" class="py-name"><a title="chimera.util.coord.Coord.strfcoord
chimera.util.coord.CoordUtil.strfcoord" class="py-name" href="#" onclick="return doclink('link-73', 'strfcoord', 'link-61');">strfcoord</a></tt><tt class="py-op">(</tt><tt class="py-string">"%(d)02d %(m)02d %(s)02.0f"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"> </tt>
<a name="TestCoord.test_parsing_conversion_hipparcos"></a><div id="TestCoord.test_parsing_conversion_hipparcos-def"><a name="L54"></a><tt class="py-lineno"> 54</tt> <a class="py-toggle" href="#" id="TestCoord.test_parsing_conversion_hipparcos-toggle" onclick="return toggle('TestCoord.test_parsing_conversion_hipparcos');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="chimera.util.tests.test_coord.TestCoord-class.html#test_parsing_conversion_hipparcos">test_parsing_conversion_hipparcos</a> <tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TestCoord.test_parsing_conversion_hipparcos-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TestCoord.test_parsing_conversion_hipparcos-expanded"><a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">        <tt class="py-docstring">"""Parsing and comparing a subset of the Hipparcos and Tycho Catalog"""</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">        <tt class="py-name">bsc</tt> <tt class="py-op">=</tt> <tt class="py-name">asciidata</tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="chimera.drivers.domelna40cm.DomeLNA40cm.open
chimera.drivers.fakecamera.FakeCamera.open
chimera.drivers.faketelescope.FakeTelescope.open
chimera.drivers.meade.Meade.open
chimera.drivers.optectcfs.OptecTCFS.open
chimera.drivers.sbig.sbig.SBIG.open
chimera.drivers.theskytelescope.TheSkyTelescope.open
chimera.interfaces.cameradriver.ICameraDriver.open
chimera.interfaces.telescopedriver.ITelescopeDriverSlew.open
chimera.util.ds9.DS9.open
chimera.util.sexcatalog.open" class="py-name" href="#" onclick="return doclink('link-74', 'open', 'link-4');">open</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-75" class="py-name"><a title="chimera.core.path" class="py-name" href="#" onclick="return doclink('link-75', 'path', 'link-5');">path</a></tt><tt class="py-op">.</tt><tt class="py-name">abspath</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-76" class="py-name"><a title="chimera.core.path" class="py-name" href="#" onclick="return doclink('link-76', 'path', 'link-5');">path</a></tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-77" class="py-name"><a title="chimera.core.path" class="py-name" href="#" onclick="return doclink('link-77', 'path', 'link-5');">path</a></tt><tt class="py-op">.</tt><tt class="py-name">dirname</tt><tt class="py-op">(</tt><tt class="py-name">__file__</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'hipparcos-tycho.dat'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">comment_char</tt><tt class="py-op">=</tt><tt class="py-string">'#'</tt><tt class="py-op">,</tt> <tt class="py-name">delimiter</tt><tt class="py-op">=</tt><tt class="py-string">'\t'</tt><tt class="py-op">)</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line"> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt class="py-name">expected_ra</tt>  <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt class="py-name">expected_ra_str</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">        <tt class="py-name">expected_dec</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">        <tt class="py-name">expected_dec_str</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line"> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">        <tt id="link-78" class="py-name"><a title="chimera.util.position.Position.ra" class="py-name" href="#" onclick="return doclink('link-78', 'ra', 'link-8');">ra</a></tt>  <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">        <tt class="py-name">ra_hms</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">         </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">        <tt id="link-79" class="py-name"><a title="chimera.util.position.Position.dec" class="py-name" href="#" onclick="return doclink('link-79', 'dec', 'link-9');">dec</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-name">dec_dms</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-80" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-80', 'i', 'link-10');">i</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">.</tt><tt class="py-name">nrows</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">            <tt class="py-name">expected_ra_str</tt><tt class="py-op">.</tt><tt id="link-81" class="py-name"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-81', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-82" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-82', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">            <tt class="py-name">expected_dec_str</tt><tt class="py-op">.</tt><tt id="link-83" class="py-name"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-83', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-84" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-84', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">            <tt class="py-name">expected_ra</tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-85', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-86" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-86', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">            <tt class="py-name">expected_dec</tt><tt class="py-op">.</tt><tt id="link-87" class="py-name"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-87', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-88" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-88', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">             </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">            <tt id="link-89" class="py-name"><a title="chimera.util.position.Position.ra" class="py-name" href="#" onclick="return doclink('link-89', 'ra', 'link-8');">ra</a></tt><tt class="py-op">.</tt><tt id="link-90" class="py-name"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-90', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt id="link-91" class="py-name"><a title="chimera.util.coord.Coord" class="py-name" href="#" onclick="return doclink('link-91', 'Coord', 'link-3');">Coord</a></tt><tt class="py-op">.</tt><tt id="link-92" class="py-name" targets="Static Method chimera.util.coord.Coord.fromD()=chimera.util.coord.Coord-class.html#fromD"><a title="chimera.util.coord.Coord.fromD" class="py-name" href="#" onclick="return doclink('link-92', 'fromD', 'link-92');">fromD</a></tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-93" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-93', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">            <tt id="link-94" class="py-name"><a title="chimera.util.position.Position.dec" class="py-name" href="#" onclick="return doclink('link-94', 'dec', 'link-9');">dec</a></tt><tt class="py-op">.</tt><tt id="link-95" class="py-name"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-95', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt id="link-96" class="py-name"><a title="chimera.util.coord.Coord" class="py-name" href="#" onclick="return doclink('link-96', 'Coord', 'link-3');">Coord</a></tt><tt class="py-op">.</tt><tt id="link-97" class="py-name"><a title="chimera.util.coord.Coord.fromD" class="py-name" href="#" onclick="return doclink('link-97', 'fromD', 'link-92');">fromD</a></tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-98" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-98', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line"> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">            <tt class="py-name">ra_hms</tt><tt class="py-op">.</tt><tt id="link-99" class="py-name"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-99', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt id="link-100" class="py-name"><a title="chimera.util.coord.Coord" class="py-name" href="#" onclick="return doclink('link-100', 'Coord', 'link-3');">Coord</a></tt><tt class="py-op">.</tt><tt id="link-101" class="py-name"><a title="chimera.util.coord.Coord.fromHMS" class="py-name" href="#" onclick="return doclink('link-101', 'fromHMS', 'link-22');">fromHMS</a></tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-102" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-102', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">            <tt class="py-name">dec_dms</tt><tt class="py-op">.</tt><tt id="link-103" class="py-name"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-103', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt id="link-104" class="py-name"><a title="chimera.util.coord.Coord" class="py-name" href="#" onclick="return doclink('link-104', 'Coord', 'link-3');">Coord</a></tt><tt class="py-op">.</tt><tt id="link-105" class="py-name"><a title="chimera.util.coord.Coord.fromDMS" class="py-name" href="#" onclick="return doclink('link-105', 'fromDMS', 'link-27');">fromDMS</a></tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt id="link-106" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-106', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-107" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-107', 'i', 'link-10');">i</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">bsc</tt><tt class="py-op">.</tt><tt class="py-name">nrows</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">            <tt class="py-comment"># FIXME: bexause of rounding errors, when we got fromD with a high precision number,</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># not every time we can convert it to DMS/HMS rounding seconds correctly. FP sucks!</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"><tt class="py-comment"></tt>             </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">            <tt class="py-comment"># test strfcoord implementation</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment">#assert expected_ra_str[i] == ra[i].strfcoord("%(h)02d %(m)02d %(s)05.2f"), "ra: %s (%.8f) != coord ra: %s (%.8f)" % (expected_ra_str[i],</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment">#                                                                                    expected_ra[i],</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment">#                                                                                    ra[i].strfcoord("%(h)02d %(m)02d %(s)05.2f"),ra[i].D)</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># </tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment">#assert expected_dec_str[i] == dec[i].strfcoord("%(d)02d %(m)02d %(s)04.1f"), "dec: %s (%s) != coord dec: %s (%.8f)" % (expected_dec_str[i],</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment">#                                                                                    expected_dec[i],</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment">#                                                                                    dec[i].strfcoord("%(d)02d %(m)02d %(s)04.1f"), dec[i].D)</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment">#</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">assert</tt> <tt class="py-name">expected_ra_str</tt><tt class="py-op">[</tt><tt id="link-108" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-108', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">ra_hms</tt><tt class="py-op">[</tt><tt id="link-109" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-109', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-110" class="py-name"><a title="chimera.util.coord.Coord.strfcoord
chimera.util.coord.CoordUtil.strfcoord" class="py-name" href="#" onclick="return doclink('link-110', 'strfcoord', 'link-61');">strfcoord</a></tt><tt class="py-op">(</tt><tt class="py-string">"%(h)02d %(m)02d %(s)05.2f"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"ra: %s != coord ra: %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">expected_ra_str</tt><tt class="py-op">[</tt><tt id="link-111" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-111', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">                                                                                                    <tt class="py-name">ra_hms</tt><tt class="py-op">[</tt><tt id="link-112" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-112', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-113" class="py-name"><a title="chimera.util.coord.Coord.strfcoord
chimera.util.coord.CoordUtil.strfcoord" class="py-name" href="#" onclick="return doclink('link-113', 'strfcoord', 'link-61');">strfcoord</a></tt><tt class="py-op">(</tt><tt class="py-string">"%(h)02d %(m)02d %(s)05.2f"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">             </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">expected_dec_str</tt><tt class="py-op">[</tt><tt id="link-114" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-114', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">dec_dms</tt><tt class="py-op">[</tt><tt id="link-115" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-115', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-116" class="py-name"><a title="chimera.util.coord.Coord.strfcoord
chimera.util.coord.CoordUtil.strfcoord" class="py-name" href="#" onclick="return doclink('link-116', 'strfcoord', 'link-61');">strfcoord</a></tt><tt class="py-op">(</tt><tt class="py-string">"%(d)02d %(m)02d %(s)04.1f"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"dec: %s != coord dec: %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">expected_dec_str</tt><tt class="py-op">[</tt><tt id="link-117" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-117', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">                                                                                                    <tt class="py-name">dec_dms</tt><tt class="py-op">[</tt><tt id="link-118" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-118', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-119" class="py-name"><a title="chimera.util.coord.Coord.strfcoord
chimera.util.coord.CoordUtil.strfcoord" class="py-name" href="#" onclick="return doclink('link-119', 'strfcoord', 'link-61');">strfcoord</a></tt><tt class="py-op">(</tt><tt class="py-string">"%(d)02d %(m)02d %(s)04.1f"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">            <tt class="py-comment"># test conversion from D to D</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">assert</tt> <tt id="link-120" class="py-name"><a title="chimera.util.tests.test_coord.TestCoord" class="py-name" href="#" onclick="return doclink('link-120', 'TestCoord', 'link-30');">TestCoord</a></tt><tt class="py-op">.</tt><tt id="link-121" class="py-name"><a title="chimera.util.tests.test_coord.TestCoord.equal
chimera.util.tests.test_position.equal" class="py-name" href="#" onclick="return doclink('link-121', 'equal', 'link-31');">equal</a></tt><tt class="py-op">(</tt><tt id="link-122" class="py-name"><a title="chimera.util.position.Position.ra" class="py-name" href="#" onclick="return doclink('link-122', 'ra', 'link-8');">ra</a></tt><tt class="py-op">[</tt><tt id="link-123" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-123', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-124" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-124', 'D', 'link-34');">D</a></tt><tt class="py-op">,</tt> <tt class="py-name">expected_ra</tt><tt class="py-op">[</tt><tt id="link-125" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-125', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">=</tt><tt class="py-number">1e-8</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"ra: %.6f != coord ra: %.6f (%.6f)"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">expected_ra</tt><tt class="py-op">[</tt><tt id="link-126" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-126', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-127" class="py-name"><a title="chimera.util.position.Position.ra" class="py-name" href="#" onclick="return doclink('link-127', 'ra', 'link-8');">ra</a></tt><tt class="py-op">[</tt><tt id="link-128" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-128', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-129" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-129', 'D', 'link-34');">D</a></tt><tt class="py-op">,</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">                                                                                                            <tt class="py-name">expected_ra</tt><tt class="py-op">[</tt><tt id="link-130" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-130', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">-</tt><tt id="link-131" class="py-name"><a title="chimera.util.position.Position.ra" class="py-name" href="#" onclick="return doclink('link-131', 'ra', 'link-8');">ra</a></tt><tt class="py-op">[</tt><tt id="link-132" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-132', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-133" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-133', 'D', 'link-34');">D</a></tt><tt class="py-op">)</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt id="link-134" class="py-name"><a title="chimera.util.tests.test_coord.TestCoord" class="py-name" href="#" onclick="return doclink('link-134', 'TestCoord', 'link-30');">TestCoord</a></tt><tt class="py-op">.</tt><tt id="link-135" class="py-name"><a title="chimera.util.tests.test_coord.TestCoord.equal
chimera.util.tests.test_position.equal" class="py-name" href="#" onclick="return doclink('link-135', 'equal', 'link-31');">equal</a></tt><tt class="py-op">(</tt><tt id="link-136" class="py-name"><a title="chimera.util.position.Position.dec" class="py-name" href="#" onclick="return doclink('link-136', 'dec', 'link-9');">dec</a></tt><tt class="py-op">[</tt><tt id="link-137" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-137', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-138" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-138', 'D', 'link-34');">D</a></tt><tt class="py-op">,</tt> <tt class="py-name">expected_dec</tt><tt class="py-op">[</tt><tt id="link-139" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-139', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">=</tt><tt class="py-number">1e-8</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"dec: %.6f != coord dec: %.64f (%.6f)"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">expected_dec</tt><tt class="py-op">[</tt><tt id="link-140" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-140', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-141" class="py-name"><a title="chimera.util.position.Position.dec" class="py-name" href="#" onclick="return doclink('link-141', 'dec', 'link-9');">dec</a></tt><tt class="py-op">[</tt><tt id="link-142" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-142', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-143" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-143', 'D', 'link-34');">D</a></tt><tt class="py-op">,</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">                                                                                                                 <tt class="py-name">expected_dec</tt><tt class="py-op">[</tt><tt id="link-144" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-144', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">-</tt><tt id="link-145" class="py-name"><a title="chimera.util.position.Position.dec" class="py-name" href="#" onclick="return doclink('link-145', 'dec', 'link-9');">dec</a></tt><tt class="py-op">[</tt><tt id="link-146" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-146', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-147" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-147', 'D', 'link-34');">D</a></tt><tt class="py-op">)</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line"> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">            <tt class="py-comment"># test conversion from DMS HMS to D</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">assert</tt> <tt id="link-148" class="py-name"><a title="chimera.util.tests.test_coord.TestCoord" class="py-name" href="#" onclick="return doclink('link-148', 'TestCoord', 'link-30');">TestCoord</a></tt><tt class="py-op">.</tt><tt id="link-149" class="py-name"><a title="chimera.util.tests.test_coord.TestCoord.equal
chimera.util.tests.test_position.equal" class="py-name" href="#" onclick="return doclink('link-149', 'equal', 'link-31');">equal</a></tt><tt class="py-op">(</tt><tt class="py-name">ra_hms</tt><tt class="py-op">[</tt><tt id="link-150" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-150', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-151" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-151', 'D', 'link-34');">D</a></tt><tt class="py-op">,</tt> <tt class="py-name">expected_ra</tt><tt class="py-op">[</tt><tt id="link-152" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-152', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">=</tt><tt class="py-number">1e-4</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"ra: %.6f != coord ra: %.6f (%.6f)"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">expected_ra</tt><tt class="py-op">[</tt><tt id="link-153" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-153', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">ra_hms</tt><tt class="py-op">[</tt><tt id="link-154" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-154', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-155" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-155', 'D', 'link-34');">D</a></tt><tt class="py-op">,</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">                                                                                                                <tt class="py-name">expected_ra</tt><tt class="py-op">[</tt><tt id="link-156" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-156', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">-</tt><tt class="py-name">ra_hms</tt><tt class="py-op">[</tt><tt id="link-157" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-157', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-158" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-158', 'D', 'link-34');">D</a></tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt id="link-159" class="py-name"><a title="chimera.util.tests.test_coord.TestCoord" class="py-name" href="#" onclick="return doclink('link-159', 'TestCoord', 'link-30');">TestCoord</a></tt><tt class="py-op">.</tt><tt id="link-160" class="py-name"><a title="chimera.util.tests.test_coord.TestCoord.equal
chimera.util.tests.test_position.equal" class="py-name" href="#" onclick="return doclink('link-160', 'equal', 'link-31');">equal</a></tt><tt class="py-op">(</tt><tt class="py-name">dec_dms</tt><tt class="py-op">[</tt><tt id="link-161" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-161', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-162" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-162', 'D', 'link-34');">D</a></tt><tt class="py-op">,</tt> <tt class="py-name">expected_dec</tt><tt class="py-op">[</tt><tt id="link-163" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-163', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">=</tt><tt class="py-number">1e-4</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"dec: %.6f != coord dec: %.64f (%.6f)"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">expected_dec</tt><tt class="py-op">[</tt><tt id="link-164" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-164', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">dec_dms</tt><tt class="py-op">[</tt><tt id="link-165" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-165', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-166" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-166', 'D', 'link-34');">D</a></tt><tt class="py-op">,</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">                                                                                                                     <tt class="py-name">expected_dec</tt><tt class="py-op">[</tt><tt id="link-167" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-167', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">-</tt><tt class="py-name">dec_dms</tt><tt class="py-op">[</tt><tt id="link-168" class="py-name"><a title="chimera.drivers.sbig.tests.grab.i" class="py-name" href="#" onclick="return doclink('link-168', 'i', 'link-10');">i</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-169" class="py-name"><a title="chimera.util.coord.Coord.D
chimera.util.position.Position.D" class="py-name" href="#" onclick="return doclink('link-169', 'D', 'link-34');">D</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line"> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line"> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"> </tt>
<a name="TestCoord.test_parse_dms"></a><div id="TestCoord.test_parse_dms-def"><a name="L119"></a><tt class="py-lineno">119</tt> <a class="py-toggle" href="#" id="TestCoord.test_parse_dms-toggle" onclick="return toggle('TestCoord.test_parse_dms');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="chimera.util.tests.test_coord.TestCoord-class.html#test_parse_dms">test_parse_dms</a> <tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TestCoord.test_parse_dms-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="TestCoord.test_parse_dms-expanded"><a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">        <tt id="link-170" class="py-name" targets="Variable chimera.util.position.Position.coords=chimera.util.position.Position-class.html#coords"><a title="chimera.util.position.Position.coords" class="py-name" href="#" onclick="return doclink('link-170', 'coords', 'link-170');">coords</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line"> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">        <tt class="py-name">t_parse</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">        <tt class="py-name">t_check</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line"> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-171" class="py-name" targets="Method chimera.util.position.Position.dd()=chimera.util.position.Position-class.html#dd"><a title="chimera.util.position.Position.dd" class="py-name" href="#" onclick="return doclink('link-171', 'dd', 'link-171');">dd</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-number">23</tt><tt class="py-op">,</tt> <tt class="py-number">24</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">mm</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">60</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">ss</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">60</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">                    <tt id="link-172" class="py-name" targets="Variable chimera.drivers.sbig.tests.connect.s=chimera.drivers.sbig.tests.connect-module.html#s,Variable chimera.drivers.sbig.tests.grab.s=chimera.drivers.sbig.tests.grab-module.html#s"><a title="chimera.drivers.sbig.tests.connect.s
chimera.drivers.sbig.tests.grab.s" class="py-name" href="#" onclick="return doclink('link-172', 's', 'link-172');">s</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'%+03d:%02d:%06.3f'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-173" class="py-name"><a title="chimera.util.position.Position.dd" class="py-name" href="#" onclick="return doclink('link-173', 'dd', 'link-171');">dd</a></tt><tt class="py-op">,</tt><tt class="py-name">mm</tt><tt class="py-op">,</tt><tt class="py-name">ss</tt><tt class="py-op">)</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line"> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">                    <tt class="py-name">t</tt> <tt class="py-op">=</tt> <tt class="py-name">time</tt><tt class="py-op">.</tt><tt class="py-name">clock</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">                    <tt class="py-name">c</tt> <tt class="py-op">=</tt> <tt id="link-174" class="py-name"><a title="chimera.util.coord.Coord" class="py-name" href="#" onclick="return doclink('link-174', 'Coord', 'link-3');">Coord</a></tt><tt class="py-op">.</tt><tt id="link-175" class="py-name"><a title="chimera.util.coord.Coord.fromDMS" class="py-name" href="#" onclick="return doclink('link-175', 'fromDMS', 'link-27');">fromDMS</a></tt><tt class="py-op">(</tt><tt id="link-176" class="py-name"><a title="chimera.drivers.sbig.tests.connect.s
chimera.drivers.sbig.tests.grab.s" class="py-name" href="#" onclick="return doclink('link-176', 's', 'link-172');">s</a></tt><tt class="py-op">)</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">                    <tt class="py-name">t_parse</tt> <tt class="py-op">+=</tt> <tt class="py-name">time</tt><tt class="py-op">.</tt><tt class="py-name">clock</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">-</tt><tt class="py-name">t</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">                     </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">                    <tt id="link-177" class="py-name"><a title="chimera.util.position.Position.coords" class="py-name" href="#" onclick="return doclink('link-177', 'coords', 'link-170');">coords</a></tt><tt class="py-op">.</tt><tt id="link-178" class="py-name"><a title="chimera.util.etree.ElementTree._ElementInterface.append
chimera.util.votable.VOTable.append" class="py-name" href="#" onclick="return doclink('link-178', 'append', 'link-11');">append</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt id="link-179" class="py-name"><a title="chimera.drivers.sbig.tests.connect.s
chimera.drivers.sbig.tests.grab.s" class="py-name" href="#" onclick="return doclink('link-179', 's', 'link-172');">s</a></tt><tt class="py-op">,</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line"> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-180" class="py-name"><a title="chimera.util.coord" class="py-name" href="#" onclick="return doclink('link-180', 'coord', 'link-2');">coord</a></tt> <tt class="py-keyword">in</tt> <tt id="link-181" class="py-name"><a title="chimera.util.position.Position.coords" class="py-name" href="#" onclick="return doclink('link-181', 'coords', 'link-170');">coords</a></tt><tt class="py-op">:</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">            <tt class="py-name">t</tt> <tt class="py-op">=</tt> <tt class="py-name">time</tt><tt class="py-op">.</tt><tt class="py-name">clock</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt id="link-182" class="py-name"><a title="chimera.util.coord" class="py-name" href="#" onclick="return doclink('link-182', 'coord', 'link-2');">coord</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-183" class="py-name"><a title="chimera.util.coord" class="py-name" href="#" onclick="return doclink('link-183', 'coord', 'link-2');">coord</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt id="link-184" class="py-name"><a title="chimera.util.coord" class="py-name" href="#" onclick="return doclink('link-184', 'coord', 'link-2');">coord</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">"!="</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-185" class="py-name"><a title="chimera.util.coord" class="py-name" href="#" onclick="return doclink('link-185', 'coord', 'link-2');">coord</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">            <tt class="py-name">t_check</tt> <tt class="py-op">+=</tt> <tt class="py-name">time</tt><tt class="py-op">.</tt><tt class="py-name">clock</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">-</tt><tt class="py-name">t</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line"> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">"#%d coords parsed in %.3fs (%.3f/s) and checked in %.3fs (%.3f/s) ..."</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-186" class="py-name"><a title="chimera.util.position.Position.coords" class="py-name" href="#" onclick="return doclink('link-186', 'coords', 'link-170');">coords</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">t_parse</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-187" class="py-name"><a title="chimera.util.position.Position.coords" class="py-name" href="#" onclick="return doclink('link-187', 'coords', 'link-170');">coords</a></tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">t_parse</tt><tt class="py-op">,</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">                                                                                         <tt class="py-name">t_check</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-188" class="py-name"><a title="chimera.util.position.Position.coords" class="py-name" href="#" onclick="return doclink('link-188', 'coords', 'link-170');">coords</a></tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">t_check</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="chimera-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://chimera.ufsc.br/">Chimera - Observatoty Automation System</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    <a href="epydoc-log.html">Generated by Epydoc
    3.0beta1 on Sat Feb  7 18:36:58 2009</a>
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
